/**
 * @Author: leibidong
 * @Description:序列化和反序列化工具
 * @File:  serializableUtil
 * @Version: 1.0.0
 * @Date: 2021/7/3 21:47
 */

package utils

import (
	"encoding/json"
	"fmt"
)

/**
 * @Author leibidong
 * @Description 结构体序列化
 * @Date  2021/7/11 17:41
 **/
func XuLieHua(s interface{}) []byte {
	var ub []byte
	ub, err := json.Marshal(s)
	if err != nil {
		fmt.Printf("%s\n", err.Error())
	}
	return ub
}
